<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script src="../3-linkList/LinkedList.js"></script>
    <script>
         function Queue(){
            this.linkList = new LinkedList();
        }

        Queue.prototype = {
            push:function(item){
                this.linkList.append(item);
            },
            poll:function(){
                return this.linkList.removeAt(0);
            },
            peek:function(){
                return this.linkList.head.value;
            },
            toString:function(){
                return this.linkList.toString();
            }
        }
        let test = new Queue()
        test.push(1)
        test.push(2)
        test.push(3)
        console.log(test.poll())
        console.log(test.poll())
    
    
    
    
    </script>
</body>
</html>